home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 1
/
Mac Magazin and MacEasy Magazine CD - Issue 01.iso
/
Sharewarebibliothek
/
Powermac
/
C64
/
SOURCE
/
Error.c
< prev
next >
Wrap
Text File
|
1994-06-06
|
2KB
|
55 lines
/*
Commodore 64 Emulator v0.4 Earle F. Philhower III
Copyright (C) 1993-4 (st916w9r@dunx1.ocs.drexel.edu)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "Processor.h"
#include "Memory.h"
#include "Error.h"
#include "Resources.h"
void ExitError(unsigned int err)
{
Str255 str;
/* Get enough free memory to display an alert */
MemoryCleanUp();
/* Get string corresponding to current FATAL error condition */
GetIndString(str, kErrorStrings, err);
/* Store that string in our dialog ParamText (^0) */
if (str[0]!=0) ParamText(str, "\p", "\p", "\p");
/* String not found, generic error condition */
else ParamText("\pUnknown error condition. Program may be corrupted.", "\p", "\p", "\p");
/* Display the alert. When user clicks OK exit */
StopAlert(kErrorAlert, nil);
ExitToShell();
}
void InternalError(signed int err)
{
Str255 str;
/* Get string corresponding to current internal error condition */
GetIndString(str, kInternalErrorStrings, -err);
/* Drop into MacsBug with error displayed */
DebugStr(str);
}